// components/modal/index.js
Component({
    properties: {
        bgOpcity: {
            type: String,
            value: '.4'
        },
        title: {
            type: String,
            value: ''
        },
        show: {
            type: Boolean,
            value: false
        },
        backgroundShow: {
            type: Boolean,
            value: false
        },
        footer: {
            type: Boolean,
            value: false
        },
        mask: {
            type: Boolean,
            value: false
        },
        closeIcon: {
            type: Boolean,
            value: true
        },
        bodyBg: {
            type: String,
            value: '#fff'
        },
    },
    options: {
        addGlobalClass: true,
        
    },
    externalClasses: ['lk-class'],
    data: {},
    methods: {
        handlerClose() {
            this.setData({
                show: false
            })
            this.triggerEvent('close')
            this.triggerEvent('change', false)

        },
        handlerMaskCloseModal() {
            // console.log(this.data.show);
            // if(this.data.backgroundShow !== true) {
            //     if (!this.data.show) {
            //         return
            //     }
            //     this.setData({
            //         show: false
            //     })
            //     this.triggerEvent('close')
            //     this.triggerEvent('change', false)
            // }

        },
        handlerCatch () {
            console.log('000111');
        }
    }
})
